package cn.initcap.designpattern.pattern.behavioral.chainofresponsibility;

/**
 * 责任链模式
 *
 * @author initcap
 * @date Created in 2018/11/1 PM10:39.
 */
public class Test {

    public static void main(String[] args) {
        BaseApprover articleBaseApprover = new ArticleBaseApprover();
        BaseApprover videoBaseApprover = new VideoBaseApprover();

        Course course = new Course();
        course.setName("Java底层原理");
        course.setArticle("底层原理的手记");
        course.setVideo("底层原理的视频");

        articleBaseApprover.setNextApprover(videoBaseApprover);

        articleBaseApprover.deploy(course);
    }

}
